<template>
	<view class="bg">
		<u-modal v-model="show" :content="content" :show-cancel-button='true' @confirm="confirm"></u-modal>
		<view class="task_bg">
			<view class="task_one" v-if="type === 1">
				<view class="task_left_top">
					<view class="task_round">
						<image src="../../../static/images/common/task.png" mode=""></image>
					</view>
					<view class="name">征地拆迁</view>
				</view>
				<view class="task_content" v-if="role === '1'">
					<view class="task_name">
						<view class="task_left">项目名称</view>
						<view class="task_right nameFont">{{ taskObj.itemCode_dictText }}</view>
					</view>
					<view class="task_child">
						<view class="task_test">
							<view class="task_left">地块名称</view>
							<view class="task_right childFont">{{ taskObj.relocateCode_dictText }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">乡镇</view>
							<view class="task_right childFont">{{ taskObj.township_dictText }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">年底目标</view>
							<view class="task_right childFont">{{ taskObj.yearTarget }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">进展情况</view>
							<view class="task_right childFont">{{ taskObj.processDetail }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">征迁状态</view>
							<view class="task_right childFont" v-if="taskObj.relocateStatus === '0'">未开始</view>
							<view class="task_right childFont" v-if="taskObj.relocateStatus === '1'">超前</view>
							<view class="task_right childFont" v-if="taskObj.relocateStatus === '2'">正常</view>
							<view class="task_right childFont" v-if="taskObj.relocateStatus === '3'">滞后</view>
							<view class="task_right childFont" v-if="taskObj.relocateStatus === '4'">完成</view>
						</view>
						<view class="task_test">
							<view class="task_left">审核状态</view>
							<view class="task_right childFont" v-if="taskObj.subProcessStatus === '0'">未开始</view>
							<view class="task_right childFont" v-if="taskObj.subProcessStatus === '1'">进行中</view>
							<view class="task_right childFont" v-if="taskObj.subProcessStatus === '2'">已完成</view>
							<view class="task_right childFont" v-if="taskObj.subProcessStatus === '3'">暂停</view>
							<view class="task_right childFont" v-if="taskObj.subProcessStatus === '4'">未配置节点</view>
							<view class="task_right childFont" v-if="taskObj.subProcessStatus === '5'">待管理员审核</view>
						</view>
					</view>
				</view>
				<view class="task_content" v-if="role === '4' || role === '2'">
					<view class="task_name">
						<view class="task_left">项目名称</view>
						<view class="task_right nameFont">{{ taskObj.itemCode_dictText }}</view>
					</view>
					<view class="task_child">
						<view class="task_test">
							<view class="task_left">地块名称</view>
							<view class="task_right childFont">{{ taskObj.relocateCode_dictText }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">乡镇</view>
							<view class="task_right childFont">{{ taskObj.township_dictText }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">征地总目标</view>
							<view class="task_right childFont">{{ taskObj.landTarget }}(亩)</view>
						</view>
						<view class="task_test">
							<view class="task_left">征地年度目标</view>
							<view class="task_right childFont">{{ taskObj.yearLandTarget }}(亩)</view>
						</view>
						<view class="task_test">
							<view class="task_left">征地进展</view>
							<view class="task_right childFont">{{ taskObj.landProcessDetail }}(亩)</view>
						</view>
						<view class="task_test">
							<view class="task_left">征地完成百分比</view>
							<view class="task_right childFont">{{ taskObj.landPercent }}(%)</view>
						</view>
						<view class="task_test">
							<view class="task_left">拆迁总目标</view>
							<view class="task_right childFont">{{ taskObj.removeTarget }}（m²）</view>
						</view>
						<view class="task_test">
							<view class="task_left">拆迁年度目标</view>
							<view class="task_right childFont">{{ taskObj.yearRemoveTarget }}（m²）</view>
						</view>
						<view class="task_test">
							<view class="task_left">拆迁进展</view>
							<view class="task_right childFont">{{ taskObj.removeProcessDetail }}（m²）</view>
						</view>
						<view class="task_test">
							<view class="task_left">拆迁完成百分比</view>
							<view class="task_right childFont">{{ taskObj.removePercent }}（%）</view>
						</view>
						<view class="task_test">
							<view class="task_left">征迁状态</view>
							<view class="task_right childFont" v-if="taskObj.relocateType === '1'">征地</view>
							<view class="task_right childFont" v-if="taskObj.relocateType === '2'">拆迁</view>
							<view class="task_right childFont" v-if="taskObj.relocateType === '3'">征地拆迁</view>
						</view>
						<view class="task_test">
							<view class="task_left">状态</view>
							<view class="task_right childFont" v-if="taskObj.relocateStatus === '0'">未开始</view>
							<view class="task_right childFont" v-if="taskObj.relocateStatus === '1'">超前</view>
							<view class="task_right childFont" v-if="taskObj.relocateStatus === '2'">正常</view>
							<view class="task_right childFont" v-if="taskObj.relocateStatus === '3'">滞后</view>
							<view class="task_right childFont" v-if="taskObj.relocateStatus === '4'">完成</view>
						</view>
					</view>
				</view>
			</view>

			<view class="task_one" v-if="type === 2">
				<view class="task_left_top">
					<view class="task_round">
						<image src="../../../static/images/common/task.png" mode=""></image>
					</view>
					<view class="name">项目进展</view>
				</view>
				<view class="task_content">
					<view class="task_name">
						<view class="task_left">项目名称</view>
						<view class="task_right nameFont">{{ taskObj.itemCode_dictText }}</view>
					</view>
					<view class="task_child" v-if=" role === '1'">
						<view class="task_test">
							<view class="task_left">本年累计投资额</view>
							<view class="task_right childFont">{{ taskObj.cycleInv }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">累计投资额</view>
							<view class="task_right childFont">{{ taskObj.invTotal }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">投资计划</view>
							<view class="task_right childFont">{{ taskObj.itemPlanInv }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">形象进展</view>
							<view class="task_right childFont">{{ taskObj.processDetail }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">下一步计划</view>
							<view class="task_right childFont">{{ taskObj.nextPlan }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">审核状态</view>
							<view class="task_right childFont" v-if="taskObj.subProcessStatus === '0'">未开始</view>
							<view class="task_right childFont" v-if="taskObj.subProcessStatus === '1'">进行中</view>
							<view class="task_right childFont" v-if="taskObj.subProcessStatus === '2'">已完成</view>
							<view class="task_right childFont" v-if="taskObj.subProcessStatus === '3'">暂停</view>
							<view class="task_right childFont" v-if="taskObj.subProcessStatus === '4'">未配置节点</view>
							<view class="task_right childFont" v-if="taskObj.subProcessStatus === '5'">待管理员审核</view>
						</view>
					</view>
					<view class="task_child" v-if=" role === '2'">
						<view class="task_test">
							<view class="task_left">所属月份</view>
							<view class="task_right childFont">{{ taskObj.dataTime }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">进展开始时间</view>
							<view class="task_right childFont">{{ taskObj.factBeginDate }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">完成年度任务</view>
							<view class="task_right childFont">{{ taskObj.finishYearPercent }}%</view>
						</view>
						<view class="task_test">
							<view class="task_left">完成全部任务</view>
							<view class="task_right childFont">{{ taskObj.finishAllPercent }}%</view>
						</view>
						<view class="task_test">
							<view class="task_left">当前状态</view>
							<view class="task_right childFont" v-if="taskObj.subProcessStatus === '0'">未开始</view>
							<view class="task_right childFont" v-if="taskObj.subProcessStatus === '1'">进行中</view>
							<view class="task_right childFont" v-if="taskObj.subProcessStatus === '2'">已完成</view>
							<view class="task_right childFont" v-if="taskObj.subProcessStatus === '3'">暂停</view>
							<view class="task_right childFont" v-if="taskObj.subProcessStatus === '4'">未配置节点</view>
							<view class="task_right childFont" v-if="taskObj.subProcessStatus === '5'">待管理员审核</view>
						</view>
					</view>
				</view>
			</view>

			<view class="task_one" v-if="type === 3">
				<view class="task_left_top">
					<view class="task_round">
						<image src="../../../static/images/common/task.png" mode=""></image>
					</view>
					<view class="name">提请协调</view>
				</view>
				<view class="task_content">
					<view class="task_name">
						<view class="task_left">项目名称</view>
						<view class="task_right nameFont">{{ taskObj.itemCode_dictText }}</view>
					</view>
					<view class="task_child">
						<view class="task_test">
							<view class="task_left">问题描述</view>
							<view class="task_right childFont">{{ taskObj.questionDescribe }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">单位</view>
							<view class="task_right childFont">{{ taskObj.departments_dictText }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">分管领导</view>
							<view class="task_right childFont">{{ taskObj.leader_dictText }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">计划开始时间</view>
							<view class="task_right childFont">{{ taskObj.planBeginDate }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">办理时间</view>
							<view class="task_right childFont">{{ taskObj.timeLimit }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">办理情况</view>
							<view class="task_right childFont">{{ taskObj.questionResult }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">审核状态</view>
							<view class="task_right childFont" >{{taskObj.questionStatus_dictText }}</view>
						</view>
						
						<view class="task_test" v-if="taskObj.questionStatus !== '0'">
							<view class="task_left">办理天数</view>
							<view class="task_right childFont" >{{ taskObj.timeLimit }}</view>
						</view>
						<view class="task_test" v-if="taskObj.questionStatus !== '0'">
							<view class="task_left">计划开始时间</view>
							<view class="task_right childFont" >{{ taskObj.planBeginDate }}</view>
						</view>
						
						<view class="task_test" v-if="taskObj.questionStatus === '0'">
							<view class="task_left">办理天数</view>
							<view class="task_right childFont" >
								<input type="text" v-model="blts" placeholder="请输入办理天数"/>
							</view>
						</view>
						<view class="task_test" v-if="taskObj.questionStatus === '0'">
							<view class="task_left">计划开始时间</view>
							<view class="task_right childFont" >
								<input type="text" v-model="jhkssj" placeholder="请选择计划开始时间" @click="showCalendar"/>
							</view>
						</view>
					</view>
				</view>
			</view>

			<view class="task_one" v-if="type === 4">
				<view class="task_left_top">
					<view class="task_round">
						<image src="../../../static/images/common/task.png" mode=""></image>
					</view>
					<view class="name">督查任务</view>
				</view>
				<view class="task_content">
					<view class="task_name">
						<view class="task_left">项目名称</view>
						<view class="task_right nameFont">{{ taskObj.itemCode_dictText }}</view>
					</view>
					<view class="task_child">
						<view class="task_test">
							<view class="task_left">节点名称</view>
							<view class="task_right childFont">{{ taskObj.subProcessDetailCode_dictText }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">轮次</view>
							<view class="task_right childFont">{{ taskObj.supervisionTimes }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">开始时间</view>
							<view class="task_right childFont">{{ taskObj.planBeginDate }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">结束时间</view>
							<view class="task_right childFont">{{ taskObj.planEndDate }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">督查事项详情</view>
							<view class="task_right childFont">{{ dcrwObj.taskContent }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">被督查经办人</view>
							<view class="task_right childFont">{{ dcrwObj.taskResDeptOperator }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">被督查责任人</view>
							<view class="task_right childFont">{{ dcrwObj.taskResDeptResUser }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">督查组</view>
							<view class="task_right childFont">{{ dcrwObj.supervision }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">有效状态</view>
							<view class="task_right childFont" v-if="taskObj.validStatus === '1'">有效</view>
							<view class="task_right childFont" v-if="taskObj.validStatus === '0'">失效</view>
						</view>
					</view>
				</view>
			</view>

			<view class="sub_title_sm" v-if="dcrwfkjlArr.length>0">督查反馈记录</view>
			<view class="task_one" v-if="type === 4 && dcrwfkjlArr.length>0">
				<u-time-line>
					<u-time-line-item nodeTop="2" v-for="(item,index) in dcrwfkjlArr" :key='index'>
						<template v-slot:content>
							<view>
								<view class="u-order-title">{{item.themes}}{{item.times}}</view>
								<view class="u-order-desc">{{item.taskSituation}}</view>
								<view class="u-order-time">
									<view>{{item.createTime}} </view>
									<view class="rightFont">{{item.urgeType}}</view>
								</view>
							</view>
						</template>
					</u-time-line-item>
				</u-time-line>
			</view>

			<view class="task_one" v-if="type === 5">
				<view class="task_left_top">
					<view class="task_round">
						<image src="../../../static/images/common/task.png" mode=""></image>
					</view>
					<view class="name">回退申请</view>
				</view>
				<view class="task_content">
					<view class="task_name">
						<view class="task_left3">项目名称</view>
						<view class="task_right nameFont">{{ taskObj.itemCode_dictText }}</view>
					</view>
					<view class="task_child">
						<view class="task_test">
							<view class="task_left3">流程名称</view>
							<view class="task_right childFont">{{ taskObj.mainProcessCode_dictText }}</view>
						</view>
						<view class="task_test">
							<view class="task_left3">需要回退的节点</view>
							<view class="task_right childFont">{{ taskObj.needBackNode_dictText }}</view>
						</view>
						<view class="task_test">
							<view class="task_left3">请求回退最终节点</view>
							<view class="task_right childFont">{{ taskObj.backToNode_dictText }}</view>
						</view>
						<view class="task_test">
							<view class="task_left3">回退原因</view>
							<view class="task_right childFont">{{ taskObj.backRemarks }}</view>
						</view>
						<view class="task_test">
							<view class="task_left3">审核状态</view>
							<view class="task_right childFont">{{ taskObj.examState_dictText }}</view>
						</view>
						<view class="task_test">
							<view class="task_left3">提交时间</view>
							<view class="task_right childFont">{{ taskObj.submitDate }}</view>
						</view>
					</view>
				</view>
			</view>


			<view class="task_one" v-if="type === 6">
				<view class="task_left_top">
					<view class="task_round">
						<image src="../../../static/images/common/task.png" mode=""></image>
					</view>
					<view class="name">项目流程</view>
				</view>
				<view class="task_content">
					<view class="task_name">
						<view class="task_left">项目名称</view>
						<view class="task_right nameFont">{{ taskObj.itemCode_dictText }}</view>
					</view>
					<view class="task_child">
						<view class="task_test">
							<view class="task_left">节点名称</view>
							<view class="task_right childFont">{{ taskObj.nodeName }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">开始时间</view>
							<view class="task_right childFont">{{ taskObj.beginDate }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">计划结束时间</view>
							<view class="task_right childFont">{{ taskObj.endDate }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">剩余时间</view>
							<view class="task_right childFont">{{ taskObj.surplusTime }}</view>
						</view>
					</view>
				</view>
			</view>

			<view class="task_one" v-if="type === 7">
				<view class="task_left_top">
					<view class="task_round">
						<image src="../../../static/images/common/task.png" mode=""></image>
					</view>
					<view class="name">流程选择</view>
				</view>
				<view class="task_content">
					<view class="task_name">
						<view class="task_left">项目名称</view>
						<view class="task_right nameFont">{{ taskObj.itemCode_dictText }}</view>
					</view>
					<view class="task_child">
						<view class="task_test">
							<view class="task_left">责任单位</view>
							<view class="task_right childFont">{{ taskObj.resDept_dictText }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">经办人</view>
							<view class="task_right childFont">{{ taskObj.operateUser_dictText }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">责任人</view>
							<view class="task_right childFont">{{ taskObj.resUser_dictText }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">工作流程</view>
							<view class="task_right childFont">{{ taskObj.mainProcessCode_dictText }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">流程名称</view>
							<view class="task_right childFont">{{ taskObj.subProcessCode_dictText }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">判断节点</view>
							<view class="task_right childFont">{{ taskObj.nodeName }}</view>
						</view>
						<view class="task_test">
							<view class="task_left">流程选择</view>
							<view class="task_right childFontGrey" @click="showLcxzPick">
								{{ lcxz }}
							</view>
						</view>
					</view>
				</view>
			</view>

		</view>
		<u-calendar v-model="rlshow" mode="date" @change="changeCalendar"></u-calendar>
		<u-toast ref="uToast" />
		<!-- 1 征地拆迁 -->
		<view v-if="type === 1" class="bottom_div">
			<!-- <view>提请协调</view> -->
			<u-button v-if="role === '2' || role === '4'" type="primary" size="default" class="customStyle"
				:ripple="true" @tap="toBsjz()">报送进展</u-button>
			<u-button v-if="role === '1'" size="default" class="customStyle" :ripple="true" @click="zdcqNoAgree">不通过
			</u-button>
			<u-button v-if="role === '1'" type="primary" size="default" class="customStyle" :ripple="true"
				@click="zdcqAgree">通过</u-button>
		</view>

		<!-- 2 项目进展 -->
		<view v-if="type === 2 && role === '1'" class="bottom_div">
			<u-button v-if="role === 2 || role === 4" type="primary" size="default" class="customStyle" :ripple="true"
				@tap="toBsjz()">报送进展</u-button>
			<u-button v-if="role === '1'" size="default" class="customStyle" :ripple="true" @click="xmjzNoAgree">不通过
			</u-button>
			<u-button v-if="role === '1'" type="primary" size="default" class="customStyle" :ripple="true"
				@click="xmjzAgree">通过</u-button>
		</view>
		<view class="xmjz_buttons" v-if="type === 2 && role === '2'">
			<view @tap="toXmlc('/pages/zdxm/details/xmlc/tqxt?item='+JSON.stringify(taskObj))">提请协调</view>
			<!-- <view>发起中断</view> -->
			<view @tap="toXmjz()">报送进展</view>
		</view>

		<!-- 2 提请协调 -->
		<view v-if="type === 3" class="bottom_div">
			<u-button  type="primary" size="default"  class="customStyle" :ripple="true" @click="tqxdAgree" v-if="taskObj.questionStatus === '0'">通过</u-button>
			<u-button  type="default" size="default"  class="customStyle" :ripple="true" @click="tqxdRevoke" v-if="taskObj.questionStatus === '1'">撤销</u-button>
			<u-button  type="primary" size="default"  class="customStyle" :ripple="true" @click="tqxdConclude" v-if="taskObj.questionStatus === '1'">办结</u-button>
			<u-button  type="primary" size="default"  class="customStyle" :ripple="true" @click="tqxdAgree" v-if="taskObj.questionStatus === '2'">通过</u-button>
		</view>
		<view class="tqxt_buttons" v-if="type == '提请协调'">
			<view @tap="showTqxt = true">退回</view>
			<view @tap="toTqxt()">办结</view>
		</view>
		<u-modal v-model="showTqxt" :content="modelContent" @confirm="confirmModel" @cancel="showTqxt = false"
			:show-cancel-button="true"></u-modal>

		<!-- 3 流程选择 -->
		<u-picker v-model="showLcxz" mode="selector" :default-selector="[0]" :range="selectorObj" range-key="cateName"
			@confirm="confirmPicker"></u-picker>
		<view class="" v-if="type === 7">
			<u-button type="primary" size="default" class="customStyle" :ripple="true" @click="showLcxzPopup">提交
			</u-button>
		</view>
		<!-- 5 回退申请 -->
		<view v-if="type === 5 && taskObj.examState === '0'" class="bottom_div">
			<u-button size="default" class="customStyle" :ripple="true" @click="htsqShow('2')">不同意</u-button>
			<u-button type="primary" size="default" class="customStyle" :ripple="true" @click="htsqShow('1')">同意
			</u-button>
		</view>


		<!-- 6 督查任务 -->
		<view class="dcfk_buttons" v-if="type === 4 && (role === '1')" @tap="revoke">
			撤销
		</view>
		<view class="dcfk_buttons" v-if="type === 4 && (role === '2'|| role === '3'|| role === '4')" @tap="toDcfk()">
			进行反馈
		</view>
		<view class="dcfk_buttons" v-if="type === 4 && (role === '5')" @tap="toDcfk()">
			督查反馈
		</view>
		<!-- 7 项目流程 -->
		<view class="xmlc_buttons" v-if="type === 6 && (role === '2'|| role === '3'|| role === '4')">
			<view @tap="toXmlc('/pages/zdxm/details/xmlc/tqxt?item='+JSON.stringify(taskObj))">提请协调</view>
			<view @tap="toXmlc('/pages/zdxm/details/xmlc/jdht?item='+JSON.stringify(taskObj))">节点回退</view>
			<view @click="complete">完成</view>
		</view>
	</view>
</template>

<script>
	import {
		zdcqAgree,
		zdcqNoAgree,
		xmjzAgree,
		xmjzNoAgree,
		dcrwDetail,
		xmlcComplete,
		htsqAgree,
		lcxzSubmit,
		dcrwRevoke,
		tqxtDetail,
		tqxtOperation
	} from '@/request/zdxm.js'
	export default {
		data() {
			return {
				htsqType: null,
				role: uni.getStorageSync('role'),
				// 类型
				type: null,
				// 详情数据
				taskObj: {},
				dcrwObj: {},
				dcrwfkjlArr: [],
				show: false,
				content: '',
				showTqxt: false,
				modelContent: "是否确认退回提请协调？",
				lcxz: "点击选择",
				choice: '',
				showLcxz: false,
				selectorObj: [],
				xmjztype: '',
				tqxdObj: {},
				zdcqtype: '',
				blts: '',
				jhkssj: '',
				tqxdType: '',
				rlshow:false
			};
		},
		onLoad(option) {
			console.log(JSON.parse(option.item))
			this.type = Number(option.type)
			this.taskObj = JSON.parse(option.item)
			if(this.type === 3){
				this.tqxtDetail()
			}else  if (this.type === 4) {
				this.dcrwDetail()
			} else if (this.type === 7) {
				this.selectorObj = [{
						cateName: this.taskObj.yesOptionName,
						id: this.taskObj.yesOption
					},
					{
						cateName: this.taskObj.noOptionName,
						id: this.taskObj.noOption
					},
				]
			}
		},
		methods: {
			changeCalendar(e){
				console.log(e)
				this.jhkssj = e.result.replaceAll('-', '')
			},
			showCalendar(){
				this.rlshow = true
			},
			// 流程选择
			confirmPicker(e) {
				this.lcxz = this.selectorObj[e].cateName;
				this.choice = this.selectorObj[e].id
			},
			showLcxzPick() {
				this.showLcxz = true
			},
			revoke() {
				this.show = true
				this.content = '是否确认撤销该督查任务'
			},
			showLcxzPopup() {
				if (this.choice) {
					this.show = true
					this.content = '是否确认项目流程是否完成'
				} else {
					this.$refs.uToast.show({
						title: '请先流程选择',
						type: "error",
						duration: 1000,
					});
				}
			},
			complete() {
				this.show = true
				this.content = '是否确认提交该流程选择'
			},
			tqxtDetail() {
				tqxtDetail({
						id: this.taskObj.id
					})
					.then((res) => {
						this.tqxdObj = res.data.result.records[0]
						console.log('提请',this.tqxdObj)
					})
			},
			dcrwDetail() {
				dcrwDetail({
						taskId: this.taskObj.id
					})
					.then((res) => {
						this.dcrwObj = res.data.result.itemMsg
						this.dcrwfkjlArr = res.data.result.records
					})
			},
			confirm() {
				if (this.type === 1) {
					if (this.zdcqtype === 1) {
						zdcqAgree({
								subProcessCode: this.taskObj.subProcessCode
							})
							.then((res) => {
								if (res.data.code === 200) {
									this.$refs.uToast.show({
										title: res.data.message,
										type: "success",
										duration: 1000,
										callback() {
											uni.redirectTo({
												url: '../todo/index'
											});
										}
									});
								}
							})
					} else {
						zdcqNoAgree({
								subProcessCode: this.taskObj.subProcessCode
							})
							.then((res) => {
								if (res.data.code === 200) {
									this.$refs.uToast.show({
										title: res.data.message,
										type: "success",
										duration: 1000,
										callback() {
											uni.redirectTo({
												url: '../todo/index'
											});
										}
									});
								}
							})
					}
				} else if (this.type === 2) {
					if (this.xmjztype === 1) {
						xmjzAgree({
							subProcessCode: this.taskObj.subProcessCode
						}).then((res) => {
							if (res.data.code === 200) {
								this.$refs.uToast.show({
									title: res.data.message,
									type: "success",
									duration: 1000,
									callback() {
										uni.redirectTo({
											url: '../todo/index'
										});
									}
								});
							}
						})
					} else {
						xmjzNoAgree({
							subProcessCode: this.taskObj.subProcessCode
						}).then((res) => {
							if (res.data.code === 200) {
								this.$refs.uToast.show({
									title: res.data.message,
									type: "success",
									duration: 1000,
									callback() {
										uni.redirectTo({
											url: '../todo/index'
										});
									}
								});
							}
						})
					}

				}else if(this.type === 3){
					if(this.tqxdType === 1){
						tqxtOperation({
							id: this.taskObj.id,
							planBeginDate: this.jhkssj,
							questionStatus: '1',
							timeLimit: this.blts
						}).then((res) => {
							if (res.data.code === 200) {
								this.$refs.uToast.show({
									title: res.data.message,
									type: "success",
									duration: 1000,
									callback() {
										uni.redirectTo({
											url: '../todo/index'
										});
									}
								});
							}
						})
					} else if(this.tqxdType === 2){
						tqxtOperation({
							id: this.taskObj.id,
							questionStatus: '2',
						}).then((res) => {
							if (res.data.code === 200) {
								this.$refs.uToast.show({
									title: res.data.message,
									type: "success",
									duration: 1000,
									callback() {
										uni.redirectTo({
											url: '../todo/index'
										});
									}
								});
							}
						})
					} else if(this.tqxdType === 3){
						tqxtOperation({
							id: this.taskObj.id,
							questionStatus: '3',
						}).then((res) => {
							if (res.data.code === 200) {
								this.$refs.uToast.show({
									title: res.data.message,
									type: "success",
									duration: 1000,
									callback() {
										uni.redirectTo({
											url: '../todo/index'
										});
									}
								});
							}
						})
					}
					
				} else if (this.type === 4) {
					dcrwRevoke({
						id: this.taskObj.id
					}).then((res) => {
						if (res.data.code === 200) {
							this.$refs.uToast.show({
								title: res.data.message,
								type: "success",
								duration: 1000,
								callback() {
									uni.redirectTo({
										url: '../todo/index'
									});
								}
							});
						}
					})
				} else if (this.type === 5) {
					htsqAgree({
						examState: this.htsqType,
						id: this.taskObj.id
					}).then((res) => {
						if (res.data.code === 200) {
							this.$refs.uToast.show({
								title: res.data.message,
								type: "success",
								duration: 1000,
								callback() {
									uni.redirectTo({
										url: '../todo/index'
									});
								}
							});
						}
					})
				} else if (this.type === 7) {
					lcxzSubmit({
						choice: this.choice,
						id: this.taskObj.id
					}).then((res) => {
						if (res.data.code === 200) {
							this.$refs.uToast.show({
								title: res.data.message,
								type: "success",
								duration: 1000,
								callback() {
									uni.redirectTo({
										url: '../todo/index'
									});
								}
							});
						}
					})
				} else {
					xmlcComplete({
							id: this.taskObj.processSubDetailCode,
							nodeStatus: '2'
						})
						.then((res) => {
							if (res.data.code === 200) {
								this.$refs.uToast.show({
									title: res.data.message,
									type: "success",
									duration: 1000,
									callback() {
										uni.redirectTo({
											url: '../todo/index'
										});
									}
								});
							}
						})
				}
			},
			htsqShow(type) {
				this.show = true;
				this.htsqType = type
				if (this.htsqType === 1) {
					this.content = '是否确认同意该条回退申请'
				} else {
					this.content = '是否确认不同意该条回退申请'
				}
			},
			zdcqAgree() {
				this.show = true;
				this.content = '是否确认通过?'
				this.zdcqtype = 1
			},
			zdcqNoAgree() {
				this.show = true;
				this.content = '是否确认不通过?'
				this.zdcqtype = 2
			},
			xmjzNoAgree() {
				this.xmjztype = 2
				this.show = true;
				this.content = '是否确认项目进展审核不通过'
			},
			xmjzAgree() {
				this.xmjztype = 1
				this.show = true;
				this.content = '是否确认项目进展审核通过'
			},
			tqxdAgree() {
				if(!this.blts){
					this.$refs.uToast.show({
						title: '请输入办理天数',
						type: 'error',
						url: '/pages/user/index'
					})
					return
				}
				if(!this.jhkssj){
					this.$refs.uToast.show({
						title: '请输入计划开始时间',
						type: 'error',
						url: '/pages/user/index'
					})
					return
				}
				this.tqxdType = 1
				this.show = true;
				this.content = '是否确认通过?'
			},
			tqxdRevoke() {
				this.tqxdType = 2
				this.show = true;
				this.content = '是否确认撤销?'
			},
			tqxdConclude() {
				this.tqxdType = 3
				this.show = true;
				this.content = '是否确认办结?'
			},
			plane() {
				this.show = true;
				this.content = '是否确认项目进展审核不通过'
			},
			// 征地拆迁
			toBsjz() {
				uni.navigateTo({
					url: "/pages/zdxm/details/zdcq/index?item=" + JSON.stringify(this.taskObj)
				});
			},
			// 提请协调
			// 办结页面
			toTqxt() {
				uni.navigateTo({
					url: "/pages/zdxm/details/tqxt/index",
				});
			},
			// 项目进展
			toXmjz() {
				uni.navigateTo({
					url: "/pages/zdxm/details/xmjz/index?item=" + JSON.stringify(this.taskObj)
				});
			},
			// 督查反馈
			toDcfk() {
				uni.navigateTo({
					url: "/pages/zdxm/details/dcfk/index?item=" + JSON.stringify(this.dcrwObj) + '&id=' + this
						.taskObj.id,
				});
			},
			toXmlc(page) {
				uni.navigateTo({
					url: page,
				});
			},
			// 退回
			confirmModel() {},
		},
	};
</script>

<style lang="scss" scoped>
	.u-node {
		width: 44rpx;
		height: 44rpx;
		border-radius: 100rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		background: #d0d0d0;
	}

	.u-order-title {
		color: #ef4136;
		font-weight: bold;
		font-size: 32rpx;
		margin-bottom: 10rpx;
	}

	.u-order-desc {
		color: #130c0e;
		font-size: 32rpx;
		margin-bottom: 10rpx;
		font-weight: bold;
	}

	.u-order-time {
		color: rgb(200, 200, 200);
		font-size: 26rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;

		.rightFont {
			color: #ef4136;
			font-size: 26rpx;
		}
	}

	.top_search {
		width: 100vw;
		height: 120rpx;
		background-color: #3988ff;
		display: flex;
		align-items: center;
		padding: 0 20rpx;
		position: fixed;
		top: 0;
		left: 0;
		z-index: 10;

		.search_screening {
			margin-left: 2%;
			height: 100%;
			display: flex;
			align-items: center;
			justify-content: center;

			image {
				width: 32rpx;
				height: 32rpx;
				margin-right: 10rpx;
			}

			.font {
				font-size: 28rpx;
				font-family: PingFang SC;
				font-weight: 400;
				color: rgba(255, 255, 255, 0.7);
			}
		}
	}

	.customStyle {
		width: 100%;
		height: 100%;
		// margin-top: -20rpx;
	}

	.task_bg {
		// margin-top: 120rpx;

		.task_one {
			background-color: rgba(255, 255, 255, 1);
			padding: 24rpx;
			position: relative;
			margin-bottom: 40rpx;
			box-shadow: 0px 0px 24rpx 0px rgba(48, 116, 255, 0.1);
			border-radius: 24rpx 8rpx 8rpx 8rpx;

			.line {
				width: 1rpx;
				height: calc(100% - 48rpx);
				// background-color: pink;
				position: absolute;
				left: 44rpx;
				top: 24rpx;
				border-left: 1rpx dashed rgba(48, 116, 255, 0.1);
				// z-index: 5;
			}
		}

		.record_flex {
			display: flex;
			align-items: flex-start;
			margin-bottom: 40rpx;

			.record_flex_1 {
				flex: 1;
				padding-left: 25rpx;

				.record_top {
					display: flex;
					align-items: center;
					justify-content: space-between;
					margin-bottom: 10rpx;

					.flex_1 {
						flex: 1;
						display: flex;
						align-items: center;
						justify-content: space-between;

						image {
							width: 16rpx;
							height: 14rpx;
						}
					}

					.flex_2 {
						flex: 1.5;
						display: flex;
						align-items: center;
						justify-content: space-between;

						image {
							width: 16rpx;
							height: 14rpx;
						}
					}

					.flex_right {
						display: flex;
						justify-content: flex-end;
						flex: 1;
					}

					.center_font {
						font-size: 24rpx;
						font-family: PingFang SC;
						font-weight: 400;
						color: #3074ff;
					}

					.name_font {
						font-size: 28rpx;
						font-family: PingFang SC;
						font-weight: bold;
						color: #272b32;
					}
				}

				.time {
					font-size: 20rpx;
					font-family: PingFang SC;
					font-weight: 400;
					color: #8e9cb3;
				}
			}

			.record_flex_40 {
				width: 40rpx;

				.round {
					width: 40rpx;
					height: 40rpx;
					background: linear-gradient(-30deg, #3074ff 0%, #41baff 100%);
					box-shadow: 2rpx 3rpx 12rpx 0rpx rgba(48, 116, 255, 0.4);
					border-radius: 50%;
					display: flex;
					align-items: center;
					justify-content: center;
					z-index: 999999;

					image {
						width: 16rpx;
						height: 16rpx;
					}
				}
			}
		}

		.task_left_top {
			position: absolute;
			top: 0;
			left: 0;
			// min-width: 200rpx;
			height: 48rpx;
			background: rgba(48, 116, 255, 0.2);
			border-radius: 24rpx;
			display: flex;
			align-items: center;

			.name {
				font-size: 20rpx;
				font-family: PingFang SC;
				font-weight: bold;
				color: #3074ff;
				padding: 0 30rpx 0 20rpx;
			}

			.task_round {
				width: 48rpx;
				height: 48rpx;
				background: #3074ff;
				z-index: 5;
				box-shadow: 2px 3px 12px 0px rgba(48, 116, 255, 0.4);
				border-radius: 50%;
				display: flex;
				align-items: center;
				justify-content: center;

				image {
					width: 24rpx;
					height: 24rpx;
				}
			}
		}

		.task_content {
			width: 100%;
			margin-top: 40rpx;

			.task_btnArr {
				display: flex;
				align-items: center;
				justify-content: flex-end;
				margin-top: 40rpx;
			}

			.task_btn {
				background: #3074ff;
				border-radius: 4rpx;
				padding: 8rpx 16rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				margin-left: 20rpx;

				image {
					width: 24rpx;
					height: 24rpx;
					margin-right: 10rpx;
				}

				.more {
					width: 24rpx;
					height: 6rpx;
					margin-right: 10rpx;
				}

				.font {
					font-size: 24rpx;
					font-family: PingFang SC;
					font-weight: 400;
					color: rgba(255, 255, 255, 0.7);
				}
			}

			.btn_color1 {
				background-color: rgba(231, 233, 240, 1);
			}

			.btn_color2 {
				background-color: rgba(248, 95, 120, 1);
			}

			.task_name {
				display: flex;
				padding-bottom: 40rpx;
			}

			.task_child {
				padding: 20rpx 0;
				border-top: 1rpx solid rgba(231, 233, 240, 1);
				border-bottom: 1rpx solid rgba(231, 233, 240, 1);
			}

			.task_test {
				display: flex;
				align-items: flex-start;
				margin: 20rpx 0;
			}

			.task_left {
				flex: 2.5;
				font-size: 24rpx;
				font-family: PingFang SC;
				font-weight: 400;
				color: #8e9cb3;
			}

			.task_left3 {
				flex: 3.2;
				font-size: 24rpx;
				font-family: PingFang SC;
				font-weight: 400;
				color: #8e9cb3;
			}

			.nameFont {
				font-size: 28rpx;
				font-family: PingFang SC;
				font-weight: bold;
				color: #272b32;
			}

			.childFont {
				font-size: 28rpx;
				font-family: PingFang SC;
				font-weight: 400;
				color: #272b32;
			}

			.childFontGrey {
				font-size: 28rpx;
				font-family: PingFang SC;
				font-weight: 400;
				color: rgba(205, 211, 224, 1);
			}

			.task_right {
				flex: 7;
				display: flex;
				align-items: center;



				.zt_type1 {
					margin-left: 10rpx;
					background: #f85f78;
					border-radius: 4rpx;
					font-size: 20rpx;
					font-family: PingFang SC;
					font-weight: 400;
					color: rgba(255, 255, 255, 0.7);
					padding: 0 16rpx;
					display: flex;
					align-items: center;
					justify-content: center;
				}

				.zt_type2 {
					margin-left: 10rpx;
					background: rgba(250, 173, 51, 1);
					border-radius: 4rpx;
					font-size: 20rpx;
					font-family: PingFang SC;
					font-weight: 400;
					color: rgba(255, 255, 255, 0.7);
					padding: 0 16rpx;
					display: flex;
					align-items: center;
					justify-content: center;
				}
			}
		}
	}

	.liucheng {
		font-size: 28rpx;
		font-family: PingFang SC;
		font-weight: 400;
		color: #cdd3e0;
	}

	.tqxt_buttons {
		width: 100%;
		height: 98rpx;
		line-height: 98rpx;
		text-align: center;
		display: flex;
		flex-flow: row nowrap;
		justify-content: flex-start;
		align-content: center;
		position: fixed;
		bottom: 0;
		left: 0;

		view:nth-child(1) {
			flex: 1;
			background: #ffffff;
			border: 1rpx solid #e7e9f0;
			font-size: 36rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #8e9cb3;
		}

		view:nth-child(2) {
			flex: 1;
			background: #3074ff;
			font-size: 36rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #fefefe;
		}
	}

	.xmjz_buttons,
	.xmlc_buttons {
		width: 100%;
		text-align: center;
		position: fixed;
		bottom: 20rpx;
		left: 0;
		display: flex;
		flex-flow: column wrap;
		align-items: center;

		view:nth-child(1),
		view:nth-child(2) {
			width: 710rpx;
			height: 98rpx;
			line-height: 98rpx;
			border: 1rpx solid #3074ff;
			border-radius: 49rpx;
			font-size: 36rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #3074ff;
		}

		view:nth-child(2) {
			margin-top: 30rpx;
		}

		view:nth-child(3) {
			margin-top: 30rpx;
			width: 710rpx;
			height: 98rpx;
			line-height: 98rpx;
			background: #3074ff;
			border-radius: 49rpx;
			font-size: 36rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #fefefe;
		}
	}

	.htsq_buttons,
	.dcfk_buttons {
		width: 100%;
		height: 98rpx;
		line-height: 98rpx;
		background: #3074ff;
		font-size: 36rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #fefefe;
		// position: fixed;
		// bottom: 0;
		// left: 0;
		text-align: center;
	}

	.bottom_div {
		width: 100%;
		height: 98rpx;
		position: fixed;
		bottom: 0;
		left: 0;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}
</style>
